<html>
<head><meta charset="utf-8"><title>speeding up tests by using less files · clippy · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/index.html">clippy</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html">speeding up tests by using less files</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="211199018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211199018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211199018">(Sep 24 2020 at 22:48)</a>:</h4>
<p>The clippy tests mostly consist of running clippy on a <code>.rs</code> file and checking the output, this is done via compiletest, right?<br>
I timed running <code>clippy-driver</code> on a  default <code>cargo new</code> <code>main.rs</code> and it took around  0.1 seconds.<br>
Multiplied by our 464 test files this already makes 46 seconds of only starting up clippy..?<br>
This seems like roughly 1/3 of the total time the tests take on my system <code> cargo --color=always test  101,21s user 32,64s system 321% cpu 41,622 total</code><br>
I wonder how much we could speed up our tests simply by having fewer files to test.</p>



<a name="211199963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211199963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211199963">(Sep 24 2020 at 22:58)</a>:</h4>
<p>mh, according to <code>-Ztime-passes</code>,  <code>clippy-driver foo.rs</code> also runs llvm <span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span></p>



<a name="211200039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211200039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211200039">(Sep 24 2020 at 22:59)</a>:</h4>
<p><span class="user-mention" data-user-id="217864">@matthiaskrgr</span> you should add <code>--emit=metadata</code> to avoid codegen</p>



<a name="211200164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211200164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211200164">(Sep 24 2020 at 23:00)</a>:</h4>
<p>ah!<br>
Down to ~0.06 seconds with --emit-metadata :)</p>



<a name="211200472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211200472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211200472">(Sep 24 2020 at 23:04)</a>:</h4>
<p>oh weird, why do we have some clippy-tests annotated with <code>// run-pass</code> ...<br>
Is that intentional?</p>



<a name="211200889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211200889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211200889">(Sep 24 2020 at 23:09)</a>:</h4>
<p>It does not look like we ever actually check the output of the running tests</p>



<a name="211201266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211201266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211201266">(Sep 24 2020 at 23:14)</a>:</h4>
<p><span class="user-mention silent" data-user-id="217864">matthiaskrgr</span> <a href="#narrow/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files/near/211200472">said</a>:</p>
<blockquote>
<p>oh weird, why do we have some clippy-tests annotated with <code>// run-pass</code> ...<br>
Is that intentional?</p>
</blockquote>
<p>It seems they were added in <a href="https://github.com/rust-lang/rust-clippy/issues/3922">clippy#3922</a></p>



<a name="211201525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211201525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211201525">(Sep 24 2020 at 23:17)</a>:</h4>
<p>Apparently the tests would not fail if there's an ICE and the annotation is not present</p>



<a name="211201993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211201993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211201993">(Sep 24 2020 at 23:23)</a>:</h4>
<p>mmh.<br>
if I remove the //run-pass from the tests and add <code>--emit=metadata</code>, this seems to shave ~7 seconds off the testsuite, prob not worth it though</p>



<a name="211202121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211202121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211202121">(Sep 24 2020 at 23:25)</a>:</h4>
<p><span class="user-mention silent" data-user-id="279272">Eduardo Broto</span> <a href="#narrow/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files/near/211201525">said</a>:</p>
<blockquote>
<p>Apparently the tests would not fail if there's an ICE and the annotation is not present</p>
</blockquote>
<p>this seems like something you could test ;)</p>



<a name="211202127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211202127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211202127">(Sep 24 2020 at 23:25)</a>:</h4>
<p>if it saves 7 seconds on each run that seems worth trying it out</p>



<a name="211202290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211202290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211202290">(Sep 24 2020 at 23:28)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files/near/211202121">said</a>:</p>
<blockquote>
<p>this seems like something you could test <span aria-label="wink" class="emoji emoji-1f609" role="img" title="wink">:wink:</span></p>
</blockquote>
<p>Indeed <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span>  I'm thinking that we may need to add some annotations to other crash tests if it's really needed <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="211202337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211202337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211202337">(Sep 24 2020 at 23:29)</a>:</h4>
<blockquote>
<p>Apparently the tests would not fail if there's an ICE and the annotation is not present</p>
</blockquote>
<p>Well it seems to also be missing from a bunch of tests.. ^^</p>



<a name="211202574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211202574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211202574">(Sep 24 2020 at 23:33)</a>:</h4>
<p>Hm. What if we  have a file that does not compile (so can't use <code>run-pass</code>) but still should fail if clippy ICEs on it?</p>



<a name="211202817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211202817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211202817">(Sep 24 2020 at 23:36)</a>:</h4>
<p><span class="user-mention silent" data-user-id="217864">matthiaskrgr</span> <a href="#narrow/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files/near/211202574">said</a>:</p>
<blockquote>
<p>Hm. What if we  have a file that does not compile (so can't use <code>run-pass</code>) but still should fail if clippy ICEs on it?</p>
</blockquote>
<p>compiletest expects that tests fail to compile by default</p>



<a name="211202827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211202827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211202827">(Sep 24 2020 at 23:36)</a>:</h4>
<p>not sure if that's what clippy uses though</p>



<a name="211203877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211203877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211203877">(Sep 24 2020 at 23:50)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files/near/211202827">said</a>:</p>
<blockquote>
<p>not sure if that's what clippy uses though</p>
</blockquote>
<p>It uses <a href="https://github.com/laumann/compiletest-rs">https://github.com/laumann/compiletest-rs</a> which should be (mostly) equivalent</p>



<a name="211203972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211203972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211203972">(Sep 24 2020 at 23:52)</a>:</h4>
<p><span class="user-mention silent" data-user-id="217864">matthiaskrgr</span> <a href="#narrow/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files/near/211202574">said</a>:</p>
<blockquote>
<p>Hm. What if we  have a file that does not compile (so can't use <code>run-pass</code>) but still should fail if clippy ICEs on it?</p>
</blockquote>
<p>We should definitely open an issue and investigate all of this, good catch</p>



<a name="211204562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211204562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211204562">(Sep 25 2020 at 00:00)</a>:</h4>
<p>(Yes right now I'm gonna sleep <span aria-label="big smile" class="emoji emoji-1f604" role="img" title="big smile">:big_smile:</span> , will take a look at that tomorrow)</p>



<a name="211223282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211223282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211223282">(Sep 25 2020 at 06:42)</a>:</h4>
<p><span class="user-mention" data-user-id="217864">@matthiaskrgr</span> about the suggestion to reduce the number of test files, I'm not sure if it's worth it. That would make the tests more complex to read, and the stderr files way longer. This would also increase the probability of conflicts between PRs.</p>
<p>Moreover, UI tests are not the ones that take most of the time. In my machine, UI tests take 17.4 seconds. The dogfood tests are the ones taking longer, 49 secs including clippy and subprojects. That's running clippy on 5 crates, which I consider a reasonable amount of time.</p>



<a name="211237098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211237098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211237098">(Sep 25 2020 at 09:45)</a>:</h4>
<p>I also think that the UI test time is fine for now. However, if there's low hanging fruit to improve, that's cool!</p>



<a name="211237385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211237385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211237385">(Sep 25 2020 at 09:48)</a>:</h4>
<blockquote>
<p>oh weird, why do we have some clippy-tests annotated with // run-pass</p>
</blockquote>
<p>iirc, we use <code>run-pass</code>because there was no <code>compile-pass</code> in compiletest-rs at the time. There might be now <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span><br>
I'm not sure if plain UI tests would be enough to catch ICEs?</p>



<a name="211247429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211247429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211247429">(Sep 25 2020 at 11:49)</a>:</h4>
<p>running all tests for the first time: <code>228,71s user 41,23s system 192% cpu 2:20,58 total</code><br>
runing tests again afterwards (no changes, no need to recompile everything for dogfood test): <code>100,55s user 32,86s system 245% cpu 54,343 total</code><br>
:/</p>



<a name="211254155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211254155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211254155">(Sep 25 2020 at 13:00)</a>:</h4>
<p>Regarding the <code>run-pass</code> annotations, I've tested it and an ICE makes the test fail regardless of the annotation.</p>
<div class="codehilite"><pre><span></span><code>diff of stderr:

+thread &#39;rustc&#39; panicked at &#39;the disco&#39;, clippy_lints/src/repeat_once.rs:41:9
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+
+error: internal compiler error: unexpected panic
+
+note: the compiler unexpectedly panicked. this is a bug.
+
+note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new
+
+note: Clippy version: clippy 0.0.212 (e636b88aa 2020-09-23)
+
+

The actual stderr differed from the expected stderr.
Actual stderr saved to /home/ebroto/src/ebroto-clippy/target/debug/test_build_base/crashes/ice-5944.stderr
To update references, run this command from build directory:
tests/ui/update-references.sh &#39;/home/ebroto/src/ebroto-clippy/target/debug/test_build_base&#39; &#39;crashes/ice-5944.rs&#39;

error: 1 errors occurred comparing output.
status: exit code: 101
[...]
test [ui] ui/crashes/ice-5944.rs ... FAILED

failures:

failures:
    [ui] ui/crashes/ice-5944.rs

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 519 filtered out

test compile_test ... FAILED
</code></pre></div>



<a name="211254412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211254412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211254412">(Sep 25 2020 at 13:02)</a>:</h4>
<p>I think it makes sense that the tests fail because the output will be different than the expected one (regardless if there's an actual error in the stderr file or if it's empty/not present).</p>
<p>I'm gonna go ahead and open a PR with the annotations removed.</p>
<p>UI tests seem to take the same amount of time after the change BTW</p>



<a name="211254482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211254482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211254482">(Sep 25 2020 at 13:03)</a>:</h4>
<p>Maybe you could set <code>emit=metadata</code> on by default for these tests</p>



<a name="211254774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211254774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211254774">(Sep 25 2020 at 13:06)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files/near/211254482">said</a>:</p>
<blockquote>
<p>Maybe you could set <code>emit=metadata</code> on by default for these tests</p>
</blockquote>
<p>Will try <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="211255686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211255686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211255686">(Sep 25 2020 at 13:14)</a>:</h4>
<p>Wow that was an improvement, from ~17 secs down to ~12 secs in my machine, thanks!</p>



<a name="211257592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211257592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211257592">(Sep 25 2020 at 13:30)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust-clippy/issues/6084">clippy#6084</a></p>



<a name="211262801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211262801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211262801">(Sep 25 2020 at 14:11)</a>:</h4>
<p>yeah, when I just added <code>emit=metadata</code>I got errors for the <code>// runs-pass</code> tests that's when I noticed them in the first place</p>



<a name="211263346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211263346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211263346">(Sep 25 2020 at 14:15)</a>:</h4>
<p>Perhaps we can use <code>./tests/ui/custom_ice_message.rs</code> to also check that ices in the tests are reported properly in the <code>tests/ui/crashes</code> dir?</p>



<a name="211265296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211265296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211265296">(Sep 25 2020 at 14:31)</a>:</h4>
<p><span class="user-mention silent" data-user-id="217864">matthiaskrgr</span> <a href="#narrow/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files/near/211263346">said</a>:</p>
<blockquote>
<p>Perhaps we can use <code>./tests/ui/custom_ice_message.rs</code> to also check that ices in the tests are reported properly in the <code>tests/ui/crashes</code> dir?</p>
</blockquote>
<p>If I'm not mistaken none of the crash tests currently result in an ICE, we add them after avoiding the ICE, so I think the output files are either empty/non-present or  contain normal lint errors</p>



<a name="211428942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/speeding%20up%20tests%20by%20using%20less%20files/near/211428942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files.html#211428942">(Sep 27 2020 at 18:48)</a>:</h4>
<p><span class="user-mention silent" data-user-id="279272">Eduardo Broto</span> <a href="#narrow/stream/257328-clippy/topic/speeding.20up.20tests.20by.20using.20less.20files/near/211265296">said</a>:</p>
<blockquote>
<p>If I'm not mistaken none of the crash tests currently result in an ICE, we add them after avoiding the ICE, so I think the output files are either empty/non-present or  contain normal lint errors</p>
</blockquote>
<p>correct. all the tests in crashes are regression tests.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>